/**
 * Below is a sample adapter for connecting with a webservice.
 */


var categoriesAdapter={
      
    fetch:function(item,callback){   
         
        $.get(BASE_URL+"categories?id=as",
            function(obj){                
                obj=JSON.parse(obj); 
                if(callback)  
                    callback(obj);  
                
            }
        );
            
        
    },
    fetchAll:function(id,callback){
        
        $.get(BASE_URL+"categories?id=asd",
            function(obj){ 
                obj=JSON.parse(obj); 
                if(callback) 
                    callback(obj);  
            }
        );
    },

}
 

Categories =  $.mvc.model.extend("categories",{
    validate:function(opts){
        if(opts&&opts.trigger)
            return "error validating";
        return true;
    },
    catID: '',
    parentID: '',
    catName: '',
    catSafe: '',
    description: '',
    dateCreated: '',
    dateModified: '',
    catOrder: '',
    banner: '' 

}, categoriesAdapter);

var categories = new Categories();
  
 